Skip to content

fix panic on minimized window while using with_render_sky_to_texture()#5

Open
oerli wants to merge 1 commit intoTanTanDev:mainfrom
oerli:fix-minimize
Open

fix panic on minimized window while using with_render_sky_to_texture()#5
oerli wants to merge 1 commit intoTanTanDev:mainfrom
oerli:fix-minimize

Conversation

@oerli
Copy link
Copy Markdown

@oerli oerli commented Mar 2, 2026

while using .with_render_sky_to_texture(), minimizing the window will result in a panic:
wgpu error: Validation Error

Caused by:
In Device::create_texture
Dimension X is zero

following fix skips resize of image texture if window size is 0 x 0 (when the window gets minimized).
and it also sets minimum for 1.0 x 1.0 at startup (this would only be necessary if bevy would ever allow to start minimized).

i tested it with my project and it stopped panic on minimizing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant